layui.use(['table','form','layer','jquery'], function(){
    var form = layui.form,
        layer = layui.layer,
        $lay = layui.jquery; //jquery
    var baseUrl = $.common.baseUrl();

    //父窗体的layui对象
    var parentLayui = parent.layui;

    //监听提交
    form.on('submit(formBtn)', function(data){
        $.ajax({
            url: baseUrl + "/system/permission",
            type: "post",
            dataType: "json",
            data:data.field,
            traditional: true,
            async: true,//异步,
            success: function(result){
                var index = parentLayui.layer.getFrameIndex(window.name); //获取窗口索引
                parentLayui.layer.close(index);//关闭父窗口
                if(result.code == 0){
                    parentLayui.table.reload('mtab');//刷新父页面表格
                }
            },error:function(){
            }
        });
        return false;
    });
});

function submitForm() {
    
}